package com.stormrage.edu.dao.learn.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.stormrage.edu.dao.learn.LeaStudentSelectDao;
import com.stormrage.entity.learn.LeaStudentSelect;
import com.stormragetech.core.dao.MysBaseDao;
import com.stormragetech.core.exception.StormrageTechException;

/**
 * @Title: LeaStudentCourseServImpl.java
 * @Package com.stormrage.edu.serv.learn.impl
 * @Description: 选课状态 Dao
 * @author www.stormragetech.com
 * @date 2016年4月21日
 * @version V1.0
 */
@Repository
public class LeaStudentSelectDaoImpl extends MysBaseDao implements LeaStudentSelectDao {

	private static final Logger logger = LoggerFactory.getLogger(LeaStudentSelectDaoImpl.class);

	@Override
	public Integer create(final LeaStudentSelect arg0) throws StormrageTechException {

		logger.debug(" 【 Dao 】-【 LeaStudentSelectDao 】-【 Create 】- 开始运行 ");

		final String query = "INSERT INTO lea_student_select (stu_id, selected) VALUES (:stuId, :selected)";
		logger.debug(" 数据库执行语句为 " + query);

		Integer index = create(query, arg0);

		logger.debug(" 【 Dao 】-【 LeaStudentSelectDao 】-【 Create 】- 完成运行 ");
		return index;

	}

}
